Particle systems authored in the editor and spawned from code, and a room-wide dim shroud that light sources cut holes in.
A particle system - how many particles, their speed and spread, how they fade, which sprite they use - is authored visually in the editor's Particles tab (one effect, effects/<name>.json), not built up by hand in GBML. Code only ever starts, bursts or stops an effect that already exists; effect_burst fires one one-shot burst and forgets it (an explosion, an impact), while effect_start/effect_stop run an effect continuously until something explicitly stops it (a torch's flicker, a waterfall's mist) and need the handle effect_start hands back to do so.
An effect may have up to three emitters - separate sprite/timing/behavior streams that fire together, sharing one blend and one live-particle budget (a campfire's flames and its smoke; a waterfall's falling water and the mist at its foot). Each emitter has its own:
(x, y), so particles start spread out (a dust cloud) rather than all from one point.The effect as a whole also has:
A GBAB project ships a library of ready-made effects (torches, water, weather, magic, loot, impacts, chained pops and splashes, sweeping/spinning emitters - the Particles tab's + From Preset… button) covering everything the fields above can express.
An emitter's Death and Step fields (in the Chaining section of its own properties) let one particle spawn particles from a different emitter of the same effect: Death fires when the parent particle's own life ends (a bubble popping into a few sparks, a raindrop throwing up a splash where it lands); Step fires repeatedly, every so many frames, for as long as the parent particle is alive (a rocket trailing smoke, a shooting star leaving a spark behind it). The emitter being fired into is usually authored with Fires on its own timer switched off, so it never also streams or bursts independently - it exists purely as a template for the chain to spawn from.
Two rules keep this from ever spiralling out of control, both enforced by the engine itself, not by anything an author has to remember:
Together, these mean a chain can never push the real on-screen particle count past what the engine already self-limits to, however aggressively it is authored - the worst case is a thinner-looking effect under heavy load, never a broken one.
An effect's Sweep angle (start)/Sweep angle (end)/Sweep style/Sweep frames fields (in its System section, alongside Blend and Camera space) rotate every emitter's own spawn region and emission direction together, as one system-wide angle - what a sprinkler head, a searchlight, or a spinning fire wheel needs. Left at their defaults (both angles 0, frames 0) an effect points exactly where its own Direction fields say and never moves, byte-identical to an effect that never touches these fields at all.
With Sweep frames above 0, a running system (one started with effect_start - a one-shot effect_burst has no elapsed time to sweep by, and always fires at the start angle) no longer sits fixed: Sweep style Bounce swings the angle from the start value out to the end value and back again, like a sprinkler swinging side to side; Loop runs from the start value to the end value and then jumps straight back to the start, a sawtooth - with a start of 0 and an end of 360 that is one full, seamless circle per lap, which is how a pinwheel or a fire wheel spins all the way round rather than swinging back and forth. Sweep frames is how many frames one pass takes (each leg for Bounce, one full lap for Loop) - smaller sweeps faster.
Every particle a project spawns shares the same fixed budgets: a project-wide cap on how many particles can be alive at once, and a limited pool of hardware affine matrices for anything rotated or scaled - once a room's own share of that pool runs out, further particles fall back to a small set of shared matrices keyed by rounded scale/angle, and then to plain flips. See Budgets for the hardware ceilings this shares with every other rotated or scaled sprite in a room.
It is tempting to read "Blend" as a per-effect setting the way Color mode or Animate are - it is not. The console has one alpha-blend register for the entire screen, and a shrouded room's own darkness already lives there (see "Lighting is a room property" below) for as long as that room is shrouded. So:
shroud_cutout_sprite already does, per instance, with its own shape and flicker. Reach for that instead of looking for it as a blend mode.A room can be marked shrouded: a room-wide, dimmed overlay drawn in front of everything, with holes cut out of it wherever a light source stands - the sprite-window trick that lets a character straddling a light's edge read as lit on one side and dark on the other. Whether a room is shrouded and which instances are lights are deliberately independent settings: a light placed in a room that is not shrouded is purely decorative (no dimming, no hole to cut, and no extra sprite spent cutting one), and a shrouded room with no lights at all is simply dark throughout - both are valid, neither is a mistake the tools warn about.
shroud_cutout is how an instance becomes a light source from code - a radius for how big a hole it cuts, and whether it flickers rather than holding a steady radius. shroud_cutout_sprite/shroud_cutout_sprite_angle cut a hole shaped like a sprite you supply instead of a plain circle. Each active light costs its own light-mask sprite only while the room is actually shrouded; a light in an unshrouded room costs nothing extra to draw.
Particles and lighting are both real, working engine features today - every function this page names is effect_burst/effect_start/effect_start_room/effect_stop/shroud_cutout/shroud_cutout_sprite/shroud_cutout_sprite_angle, all callable from GBML source right now, backed by a real particle service (engine/include/gbml/effects.h) and a real shroud/light-mask system (gbml/room.h/gbml/light.h).